<?php TPL::output('admin/global/header.tpl.htm'); ?>
<?php TPL::output('admin/global/nav_menu.tpl.htm'); ?>

<div class="aw-content-wrap">
    <div class="mod">
        <div class="mod-head">
            <h3>
                <ul class="nav nav-tabs">
                    <li class="active"><a href="#list" data-toggle="tab"><?php _e('前台菜单管理'); ?></a></li>
                    <li><a href="admin/nav/edit/"><?php _e('新建菜单'); ?></a></li>
                </ul>
            </h3>
        </div>

        <div class="mod-body tab-content">
            <div class="tab-pane active" id="list">
                <div class="table-responsive">
                <form id="batchs_form" action="admin/nav/remove/" method="post">
                <?php if ($this->lists) { ?>

                    <table class="table table-striped">
                        <thead>
                            <tr>
                                <th><input type="checkbox" class="check-all"></th>
                                <th><?php _e('排序'); ?></th>
                                <th><?php _e('菜单标题'); ?></th>
                                <th><?php _e('状态'); ?></th>
                                <th><?php _e('url'); ?></th>
                                <th><?php _e('操作'); ?></th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php foreach ($this->lists AS $val) { ?>
                            <tr>
                                <td><input type="checkbox" name="ids[]" value="<?php echo $val['id']; ?>"></td>
                                <td><?php echo $val['sort']; ?></td>
                                <td><a href="javascript:;" ><?php _e($val['title']); ?></a></td>
                                <td>
                                    <?php if ($val['status']=='Y') { ?>
                                    启用
                                    <?php } else { ?>
                                    禁用
                                    <?php } ?>
                                </td>
                                <td>
                                    <a target="_blank" href="<?php echo $val['url']; ?>"><?php echo $val['url']; ?></a>
                                </td>
                                <td><a href="admin/nav/edit/id-<?php echo $val['id']; ?>" class="icon icon-edit md-tip" title="<?php _e('编辑'); ?>" data-toggle="tooltip"></a></td>
                            </tr>
                            <?php } ?>
                        </tbody>
                    </table>
                <?php } ?>
                </form>
                </div>

                <div class="mod-table-foot">
                    <?php echo $this->pagination; ?>
                    <a class="btn btn-danger" onclick="AWS.dialog('confirm',{'message': '确定要删除吗？'},function(){
                        $('.modal-backdrop').hide();
                        AWS.ajax_post($('#batchs_form'));
                    });"><?php _e('删除'); ?></a>                   
                </div>
            </div>
        </div>
    </div>
</div>

<?php TPL::output('admin/global/footer.tpl.htm'); ?>